@import 'defaults';

.chart-container {
  position: absolute;
  margin: auto;
  cursor: pointer;
  overflow: visible;
}

canvas {
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.chartjs-tooltip {
  opacity: 0;
  position: absolute;
  background: $color-chart-tooltip-bg;
  color: $color-chat-tooltip-text;
  border-radius: 3px;
  -webkit-transition: all 0.1s ease;
  transition: all 0.1s ease;
  pointer-events: none;
  font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif !important;

  -webkit-transform: translate(-50%, 0);
  transform: translate(-50%, 0);

  &.transform-left {
    transform: translate(-10%, 0);

    &::after {
      left: 10%;
    }
  }

  &.transform-right {
    transform: translate(-90%, 0);

    &::after {
      left: 90%;
    }
  }
}

.chartjs-tooltip::after {
  content: ' ';
  position: absolute;
  top: 100%; /* At the bottom of the tooltip */
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: $color-chart-tooltip-border transparent transparent transparent;
}

::ng-deep .chartjs-tooltip-key {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
}
